import { ColumnProps } from "/@/components/ProTable/interface";

// 配置项
const columns = (renderHeader: any): Partial<ColumnProps>[] => {
    return [{
            type: "selection",
            width: 60,
            fixed: "left"
        },
        {
            type: "index",
            label: "#",
            width: 60
        },
        {
            prop: "dataSource",
            label: "操作平台",
            enum: [{label: '管理平台', value: 'web'}, {label: '小程序', value: 'mp'}],
            tag: true,
            width: 140,
        },
        {
            prop: "operateType",
            label: "操作类型",
            enum: [{label: '新增', value: 'add'}, {label: '编辑', value: 'edit'}, {label: '删除', value: 'delete'}],
            tag: true,
            searchType: "select",
            search: true,
            width: 100,
        },
        {
            prop: "source",
            label: "操作标识",
            width: 180,
            search: true,
        },
        // {
        //     prop: "batch",
        //     label: "操作批次",
        //     width: 280,
        //     search: true,
        // },
        {
            prop: "tableName",
            label: "操作表名",
            width: 180,
            search: true,
        },
        // {
        //     prop: "tableId",
        //     label: "数据ID",
        //     width: 180,
        //     search: true,
        // },
        {
            prop: "operateUser",
            label: "操作用户",
            width: 160,
        },
        {
            prop: "content",
            label: "操作内容",
        },
        {
            prop: "operation",
            label: "操作",
            width: 120,
            fixed: "right"
        }
    ]
}

export default columns;